#!/usr/bin/env python3
import sys

ip_file = sys.argv[1]
f = open(ip_file)
text = list(f)
f.close()

for i in text:
    if i.startswith('BOOTPROTO'):
        print(i, end='')
    elif i.startswith('IPADDR'):
        print(i, end='')
    elif i.startswith('NETMASK') or i.startswith('PREFIX'):
        print(i, end='')
    elif i.startswith('GATEWAY'):
        print(i, end='')
    elif i.startswith('DNS1'):
        print(i, end='')
